package com.example.fufudamowang.activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class Main2Activity extends AppCompatActivity {
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        Bundle bundle=this.getIntent().getExtras();
        String ans=bundle.getString("ans");
        Button B2=(Button) findViewById(R.id.B2);

        B2.setOnClickListener(new Button.OnClickListener()
        {
            public void onClick(View v){
                Main2Activity.this.setResult(RESULT_OK,intent);
                Main2Activity.this.finish();
            }


        });
        TextView TV2=(TextView) findViewById(R.id.TV2);
        if(ans.equals("7"))
        {
            TV2.setText("正确");
        }
        else{
            TV2.setText("错误");
        }




    }
}
